using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PauseUI : MonoBehaviour
{
    private Animator anim;

    private void Start()
    {
        anim = GetComponent<Animator>();
    }

    public void OnPauseButtonClick()
    {
        Time.timeScale = 0;//这种游戏逻辑的控制最好放到gamemanager中进行管理
        anim.SetBool("IsShow", true);
    }

    public void OnContinueButtonClick()
    {
        Time.timeScale = 1;
        anim.SetBool("IsShow", false);
    }

    public void OnRestartButtonClick()
    {
        GameManager.Instance.OnRestartLevel();
    }

    public void OnLeveListButtonClick()
    {
        GameManager.Instance.LevelList();
    }
}
